<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <!-- <div v-bind:style="{color: c }">我是div</div> -->

      <!-- <div :style="{color: color }">我是div</div> -->
      <!-- 对象里如果属性名跟右边的变量名一样，就可以简写 -->
      <!-- <div :style="{ color }">我是div</div> -->
      <div :style="{ color, backgroundColor: bgColor, height: h + 'px' }">我是div</div>
     
    </div>
    <script src="./vue.js"></script>
    <script>
      new Vue({
        el: '#app',
        data () {
          return {
            color: 'blue',
            bgColor: 'orange',
            h: 300
          }
        },
        methods: {}
      })
    </script>
  </body>
</html>
